Advances in microprocessor and video related technologies have led to wide spread deployment and adoption of numerous types of video devices. Examples of such video devices include but are not limited to digital camcorders, digital versatile disk (DVD) players, video enabled laptop and desktop computing devices as well as servers, and so forth.
Advances in networking, telecommunication, satellite and other related technologies have also led to increase in on demand and/or real time online delivery of video, including delivery over public networks, such as the Internet.
Whether videos are delivered offline (e.g. from a DVD player) or online (e.g. from a video server), high quality video inherently requires a high volume of data. Thus, video delivery and rendering often involve encoding and decoding to reduce the amount of data to be stored, retrieved and/or transmitted.
Encoding/decoding of a video often involves processing the video as a stream of pictures. Each picture may be a field or a frame (typically consisting of two interleaved fields) comprising a number of macroblocks.
Each picture may be typed, e.g. an 1-type, a P-type, or a B-type (also referred as I picture, P picture and B picture). An I picture is a picture coded using information only from itself. A P picture is a picture coded using motion compensated prediction from previously-decoded reference fields or frames, using at most one motion vector and reference picture to predict the value of each individual region. A B picture is a “predictive-coded” picture, where some macroblocks may use a weighted average of two distinct motion-compensated prediction values for the prediction of the macroblock sample values.
Each macroblock typically comprises tiles of pixels, e.g. tiles of 16×16 pixels. Further, each macroblock is typically typed, with the macroblock type indicating the specific method to encode (and therefore decode) this group of pixels, e.g. whether coding (and therefore decoding) is based on global motion, local motion, and so forth. Moreover, each macroblock type itself is typically coded into a codeword, along with coding of other aspects of the macroblock, e.g. its transform coefficients and so forth.
However, in the prior art, macroblock type is typically encoded in a static, i.e. non-adaptive, variable length encoding (VLC) manner. Experience has shown static VLC encoding of macroblock types of macroblocks of a picture may be inefficient, at least at times.
Thus, it will be desirable to encode and decode macroblock types of macroblocks of pictures of a video in a context-adaptive manner that is more effective, than the static non-adaptive techniques known to-date.
For further information on macroblock type, and prior art approaches to encoding macroblock type, see e.g. ITU-T Recommendation H.263 (ITU-T stands for International Telecommunication Union—Telecommunication Standardisation Sector).